Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming


Defining interfaces

An interface is a type of class that specifies method prototypes and certain related data definitions that must be implemented by user-defined classes that specify the interface in their own class definitions. Progress allows you to define an interface as a named block that always begins with the INTERFACE statement and always ends with the END INTERFACE statement. The INTERFACE statement identifies the class file to the compiler as an interface and provides the interface type name that other classes can use to specify this interface as one they intend to implement. The INTERFACE statement differs from the CLASS statement in that it does not support the inheritance of classes or the implementation of other interfaces, and by definition, it cannot be specified as FINAL. An interface can define temp-tables and ProDataSets that are used as parameters to its methods. Methods in an interface are limited to defining method prototypes that contain no executable code. Interfaces are always PUBLIC. For more information on defining interfaces, see the "Defining an interface" section.

Comparison with procedure-based programming

Persistent procedures have no equivalent for an interface.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095